# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libksane
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://www.kde.org/applications/graphics/"
pkgdesc="An image scanning library"
license="LGPL-2.1-only OR LGPL-3.0-only"
makedepends="extra-cmake-modules qt5-qtbase-dev ki18n-dev kwidgetsaddons-dev ktextwidgets-dev kwallet-dev sane-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/libksane-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="6c38f8978149bd3b823d94822996dd2bbed2542a23960a3b8e399eb0fedeee5536e65ab27760941ad037101dbc27ffadf51a4103d0323c4e674f25d5fa12481e  libksane-20.04.3.tar.xz"
